using System;

namespace Com.FirstSolver.Splash;

public class SM2UserInformation
{
	public readonly string OwnerId;

	public readonly BigInteger PrivateKey;

	public readonly BigInteger PublicKeyX;

	public readonly BigInteger PublicKeyY;

	public SM2UserInformation(string ownerId, string privateKey, string publicKeyX, string publicKeyY)
	{
		if (string.IsNullOrEmpty(ownerId) || string.IsNullOrEmpty(privateKey) || privateKey.Length != 64 || string.IsNullOrEmpty(publicKeyX) || publicKeyX.Length != 64 || string.IsNullOrEmpty(publicKeyY) || publicKeyY.Length != 64)
		{
			throw new ArgumentException();
		}
		OwnerId = ownerId;
		PrivateKey = new BigInteger(privateKey, 16);
		PublicKeyX = new BigInteger(publicKeyX, 16);
		PublicKeyY = new BigInteger(publicKeyY, 16);
	}
}
